package com.xiexie.order;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @Description
 * @Date 2022-04-07 14:52
 * @Author xie
 */
@SpringBootApplication
public class OrderSentinelApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderSentinelApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate(RestTemplateBuilder builder) {
        RestTemplate restTemplate = builder.build();
        return restTemplate;
    }

    //@Bean
    //public SentinelResourceAspect sentinelResourceAspect() {
    //    return new SentinelResourceAspect();
    //}
}
